package com.dadiwang;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class DadiwangActivity extends Activity {
	
	private Button driver, passenger;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        //get widgets instances
        driver = (Button)findViewById(R.id.iamdriver);
        passenger = (Button)findViewById(R.id.iampassenger);
        
        //register listeners
        driver.setOnClickListener(new OnClickListener(){

			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(DadiwangActivity.this,DriverMain.class);
				startActivity(intent);
				
			}
        	
        });
        
        passenger.setOnClickListener(new OnClickListener(){

			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(DadiwangActivity.this,PassengerMain.class);
				startActivity(intent);
				
			}
        	
        });
        
    }
}